<{extend name="public/layout"}>

<{block name="h1"}>系统配置<{/block}>

<{block name="breadcrumb"}>
<li class="active">系统配置</li>
<{/block}>

<{block name="content"}>
<div class="row">
    <div class="col-xs-12">
        <div class="box box-primary">
            <div class="box-body">
                <div class="nav-tabs-custom">
                    <!-- TAB NAVIGATION -->
                    <ul class="nav nav-tabs" role="tablist">
                        <li><a href="<{:url('config')}>">系统配置</a></li>
                        <li class="active"><a href="javascript: void(0);">常用语配置</a></li>
                    </ul>
                    <!-- TAB CONTENT -->
                    <div class="tab-content">
                        <div class="active tab-pane fade in">
                            <div style="margin-bottom: 15px;">
                                <a href="<{:url('add')}>" class="btn btn-primary"><i class="fa fa-plus"></i> 添加</a>
                            </div>
                            <table id="datatable" class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>常用语</th>
                                    <th>状态</th>
                                    <th width="120px">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <{volist name="rows" id="row"}>
                                <tr>
                                    <td><{$row.id}></td>
                                    <td><{$row.content}></td>
                                    <td>
                                        <{$row.status === 'normal' ? '<label class="label bg-primary">启用</label>' : '<label class="label bg-danger">禁用</label>'}>
                                    </td>
                                    <td>
                                        <a href="<{:url('add', ['id' => $row.id])}>" class="btn btn-xs btn-primary">编辑</a>
                                        <a href="javascript: void(0);" class="btn btn-xs btn-danger btn-delete" data-url="<{:url('delete', ['id' => $row.id])}>">删除</a>
                                    </td>
                                </tr>
                                <{/volist}>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<{/block}>

<{block name="js"}>
<{js href="/static/admin/js/johnxu.js"}>
<script>
    $(function() {
        $('#datatable').DataTable()
    })
</script>
<{/block}>